import base
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
from django.conf import settings


region = 'ap-chengdu'  # 替换为用户的 Region

config = CosConfig(Region=region, SecretId=settings.SECRET_ID, SecretKey=settings.SECRET_KEY)

client = CosS3Client(config)

client.delete_object(
    Bucket='sandox-1320997346',
    Key='p1.png'  # 上传到桶之后的文件名
)
